home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / filesy~1 / mfs609s.zoo / docs / minixfs.doc < prev    next >
Encoding:
Text File  |  1993-11-25  |  11.1 KB  |  219 lines

  1. This file gives brief details of the installable filesystem minix.xfs version
  2. 0.60.
  3.  
  4. This driver works with both V1 and V2 filesystems, so if you are using minix
  5. 1.6.xxx with the new V2 filesytem then it should handle them OK. pl5++ should
  6. be able to cope with any sector size: see pl5.doc for more info.
  7.  
  8. If minix.xfs will access your minix partitions on your setup OK then skip
  9. the next paragraph.
  10.  
  11.     If you can't access partitions then it is possible that your driver
  12. software wont access them. The partition type must be GEM (sorry but it's a bit
  13. awkward to access non-GEM partitions). Also the sector size on the minix
  14. partitions must be either 1K or 512 bytes (as well as the extended Rwabs call
  15. being mandatory for very large V2 partitions). If both of these are OK then
  16. maybe the driver software doesn't like the boot sector of your minix
  17. partitions. There are two solutions to this, described in greater detail
  18. in 'minit.doc'.  If you have minix filesystems on GEM partitions and the
  19. 'fixup' program still wont permit access to your partitions with minix.xfs then
  20. please let me know, giving details of your setup.
  21.  
  22. Now this version of minixfs uses all of the new features in MiNT ... hardlinks
  23. symbolic links chmod,chown etc. Symbolic links may cause trouble, if you have
  24. minix and try 'fsck' on them ... plain minix doesn't understand symbolic links
  25. and fsck will try to delete them. Note: an older symbolic link package for
  26. minix stuffed all the info in the inodes ... this wont work with minix.xfs .
  27. I think there is a newer symlinks package that does work. However the package
  28. must use the same mode for symbolic links, the default value is 0160000 edit
  29. either minixfs or the minix symlinks package so that the two agree and
  30. recompile as appropriate. Now about fsck ... if you are using minix 1.6.xxx then
  31. the new fsck will handle symlinks correctly if you add the flag
  32. -DI_SYMBOLIC_LINK=0160000 when you compile it. If aren't running 1.6.xxx
  33. then apply 'fsck.dif' (with patch) to the old minix fsck.c . 'fsck.dif' should
  34. be supplied with this filesystem driver. Keep the old fsck source though for
  35. upgrades. Note the dif assumes that the version of fsck you are using is the
  36. one with minix 1.5.10 (or 1.5 if its 'out of the box' and hasn't been upgraded
  37. from 1.1 ). The file should have crc 25152 (before patching) and 24070 after.
  38.  
  39. File locking has been added for this version, it has not been extensively
  40. tested so be careful !
  41.  
  42. Filename translation has been overhauled for this version. See the fscntl
  43. section for details.
  44.  
  45. Another potentially useful feature is supported by this version, you can
  46. have longer filenames if you initialise the filesystem properly. Currently
  47. this can only be done by wiping existing partitions. Also minix itself wont
  48. recognise this new format, though it may be possible to persuade it, I
  49. haven't tried this myself.
  50.  
  51. Several fscntl options exist for varous purposes. The constants are defined in
  52. minixfs.h . 
  53.  
  54. MFS_VERIFY, this is intended to check if the partition is minix, the value
  55. MFS_MAGIC will be sent to the long argument 'arg' points to.
  56.  
  57. MFS_SYNC, sync the filesystem in a manner similar to the unix sync() sys call.
  58. Minixfs does however sync the filesystem at regular intervals such as when any
  59. file is closed so it is certainly not necessary to call this before powering
  60. down the system.
  61.  
  62. MFS_CINVALID, invalidate all cache entries for the drive fscntl path resides
  63. on. This will be used by fsck (if I ever get it finished) so that a filesystem
  64. can be messed about with at a low level and the cache wont ever become out
  65. of sync with the physical filesystem (a recipe for disaster).
  66.  
  67. MFS_FINVALID, invalidate all file descriptors for the drive fscntl resides on.
  68.  
  69. MFS_IMODE, use 'arg' as an inode mode number to change the object pointed to
  70. by the fscntl path. This makes it possible to change directories to files and
  71. vice versa. If you aren't sure what that means do *not* use this option, you
  72. can trash filesystems with it !
  73.  
  74. MFS_INFO, 'arg' points to an mfs_info structure, this has the following
  75. entries (with meanings) :
  76.  
  77. long total_inodes,total_zones;
  78. long free_inodes,free_zones;
  79. int version;            /* Filesystem version 1=V1 2=V2 */
  80. int increment;            /* Directory increment */
  81. long res1,res2,res3,res4;    /* Reserved for future use */
  82.  
  83. 'int' is 16 bits in this context. 'increment' is a measure of the maximum
  84. filename length this is given by ((increment<<4)-2). This option is
  85. effectively a more relevant minixfs version of 'dfree'.
  86.  
  87. MFS_GTRANS, the value 'arg' points to is set to the current translation
  88. options. (see MFS_STRANS).
  89.  
  90. MFS_STRANS, the current translation options are set to the value 'arg'
  91. points to. Since these options are global (i.e. affect all programs), the
  92. calling process must be root to do it. Currently valid options are the
  93. following or'ed together :
  94.  
  95. SRCH_TOS  : when searching for files translate the name searched for and the
  96.         name being matched to TOS 8+3 format, in tos domain. E.g. the
  97.         filename 'LargeName.c' becomes LARGENAM.C and can be accessed as
  98.         anything that gets translated to this, like LARgenamefile.C' .
  99. SRCH_MNT  : as above but MiNT domain.
  100. DIR_TOS   : when using Dreaddir in compatability mode (and Fsfirst/Fsnext)
  101.         translates filename to TOS 8+3, tos domain only. In normal mode
  102.         filenames are *never* translated. Without this option filenames
  103.         longer than 12 characters will be truncated for Fsfirst/Fsnext.
  104. DIR_MNT   : as above but MiNT domain.
  105. AEXEC_TOS : files with extensions TTP,TOS,APP,PRG,ACC,GTP are automatically
  106.         given execute permissions in tos domain with this option
  107.         (comparison is not case sensitive so works for ttp, TtP too).
  108. AEXEC_MNT : as above but MiNT domain.
  109. LWR_TOS   : created filenames are translated to lower case in tos domain.
  110. LWR_MNT   : as above but MiNT domain.
  111.  
  112. The purpose of these options is to help programs expecting 8+3 filenames to
  113. work, e.g. the file selector. The default values for translation are in
  114. minixfs\config.h, in TRANS_DEFAULT. The translation modes are filesystem specific
  115. so you can have different modes on each drive. When a drive is changed the modes
  116. remain the same this is primarily so that hitting 'ESC' doesn't return a desktop
  117. window to the default mode. A sample program is supplied that allows these
  118. options to be set, see 'mfsconf.doc' for details.
  119.  
  120. A few other options. SCACHE_SIZE and UCACHE_SIZE, these determine the
  121. size (in K) of the caches used for minixfs, don't make them smaller than about
  122. 10 or the filesystem performance will deterriorate considerably. Increase them
  123. by all means, this will reduce the amount of I/O required by the filesystem.
  124. SCACHE refers to the system cache which is called for 'internal' operations such
  125. as reading/writing directories and inodes. UCACHE is the user cache which
  126. contains user data (from reading/writing files). These are separated so that
  127. if a program does a lot of file I/O minix.xfs wont have to re-read directories
  128. for example. Since version 0.60 I've also added ICACHE_SIZE, this cache is for
  129. inodes only, it's primary purpose is to allow some of the speed optimisations
  130. to work. There is no real need to make it much bigger than the default size
  131. unless you have lots of files open simultaneously, when it will reduce I/O.
  132.  
  133. The MAX_INCREMENT determines the maximum value which may be passed to the '-n'
  134. option when creating the filesystem with minit. Unless you are using long
  135. filename filesystems, this option is irrelevant. However if you are using them
  136. then minix.xfs will not read a filesystem whose directory increment is bigger
  137. than MAX_INCREMENT. MAX_INCREMENT should be a power of two between 1 and 16
  138. (inclusive), its default is 2 which allows up to 30 characters in a filename
  139. of a suitable filesystem, this should be more than adequate for most cases.
  140. For more information about the long filename filesystems read 'minit.doc'.
  141.  
  142. I wouldn't recommend using the ROBUST compilation option any more. It causes
  143. lots of I/O and really slows the filesystem down a great deal. If your system
  144. crashes (or you reset/power it down) in the middle of minixfs file operations,
  145. fsck should be run to fix any problems (in fact you should do this at regular
  146. intervals anyway).
  147.  
  148. A note about the code. It was written as independently as possible from minix,
  149. so any resemblances are entirely coincidental (well what would you call
  150. something that searches directories other than search_dir, or allocates
  151. bits in a bitmap other than alloc_bit ?). Naturally I had to look up the
  152. format of inodes/superblock  and the disk layout and so some of the
  153. inode/superblock structures are the same. I could have changed all the names
  154. but this would have been pretty confusing for someone looking at the code
  155. that was familiar with the FS code in Minix, so I kept the originals as far
  156. as possible. Also please note filesystems are complex things to write and
  157. although I've tried to anticipate bugs it is possible one or two got through.
  158. If you spot *anything* that makes fsck in minix complain (other than symlinks
  159. in an unpatched fsck) please let me know and I'll try to fix any bugs asap.
  160.  
  161.     Now a few notes for future versions. Hopefully, now this is a separate
  162. filesystem, I should be able to upgrade/bugfix minix.xfs fairly independently
  163. of MiNT, so send and bugs/suggestions to the email below. However minix.xfs is
  164. not my number one priority and circumstances in the near future may make heavy
  165. demands on my time, so I can't guarantee immediate bugfixes or enhancements.
  166.  
  167.     I hope this program illustrates how useful installable filesystems are
  168. in MiNT, they could be easily used for other formats, such as Spectre or TT
  169. Unix (though not easily written!). I would be quite prepared to write such
  170. things, however there are two snags. Firstly I don't have access to the
  171. necessary information of the relevant filesystem format (or the software that
  172. uses them) and secondly I am not in a position to write such things free of
  173. charge. I'd be happy to discuss such things with any interested party, via
  174. either the email address below, phone or snail mail (or indeed any other
  175. programming projects).
  176.  
  177. A few credits, thanks to :
  178.  
  179. Eric R. Smith for MiNT and lots of helpful advice (not to mention re-writing
  180. minixfs to work as an installable filesystem).
  181.  
  182. Andy S Tanenbaum. For writing Minix in the first place.
  183.  
  184. Frans Meulenbroeks for the ST version of Minix.
  185.  
  186. Also thanks to everyone who sent in bugs reports or suggestions to this and
  187. earlier versions of minixfs.
  188.  
  189. Thanks must also go to everyone at Edinburgh University (and elsewhere) who
  190. supported the Tardis project which gave me net access up until August 1991,
  191. Tardis is sadly missed :-(
  192.  
  193. Thanks to Steve Usher for his help with my previous email address.
  194.  
  195. Thanks to Nyx for my current email.
  196.  
  197. All comments/questions/bugfixes/suggestions/flames to :
  198.  
  199. shenson@nyx.cs.du.edu
  200.  
  201. Alternatively I can be reached via snail mail or telephone as :
  202.  
  203. S. N. Henson,
  204.  4 Monaco Place,
  205.   Westlands, 
  206.    Newcastle,
  207.     Staffs. ST5 2QT.
  208.      England.
  209.  
  210. Phone : 
  211. UK:         (0782) 662808
  212. Elsewhere:    +44 782 662808
  213.  
  214. I cannot guarantee to reply to articles posted to comp.sys.atari.st and
  215. comp.sys.atari.st.tech . In fact I don't read these groups much at all
  216. at present, so any suggestions or bug reports are likely to never reach me
  217. if mentioned via Usenet. If you want to ensure you get a reply then
  218. USE EMAIL.
  219.